package com.eastjet.maintenance.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 保养任务表
 * @TableName device_mt
 */
@TableName(value ="device_mt")
@Data
public class DeviceMt implements Serializable {
    /**
     * 保养任务编号
     */
    @TableId
    private Integer mtId;

    /**
     * 保养任务编码
     */
    private String code;

    /**
     * 保养计划编码
     */
    private String mtMpId;

    /**
     * 保养任务实际开始时间
     */
    private Date mtOkontime;

    /**
     * 保养任务实际结算时间
     */
    private Date mtOkuntime;

    /**
     * 任务用时
     */
    private String mtTime;

    /**
     * 工作描述
     */
    private String jobDescription;

    /**
     * 设备编号
     */
    private String mtEquipmentId;

    /**
     * 验收人
     */
    private String mtAcceptperson;

    /**
     * 验收时间
     */
    private Date mtAccepttime;

    /**
     * 备注
     */
    private String notes;

    /**
     * 任务保养状态(状态编码外键)
     */
    private Integer state;

    /**
     * 创建人
     */
    private String insertPerson;

    /**
     * 创建时间
     */
    private Date insertTime;

    /**
     * 更新人
     */
    private String updatePerson;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceMt other = (DeviceMt) that;
        return (this.getMtId() == null ? other.getMtId() == null : this.getMtId().equals(other.getMtId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getMtMpId() == null ? other.getMtMpId() == null : this.getMtMpId().equals(other.getMtMpId()))
            && (this.getMtOkontime() == null ? other.getMtOkontime() == null : this.getMtOkontime().equals(other.getMtOkontime()))
            && (this.getMtOkuntime() == null ? other.getMtOkuntime() == null : this.getMtOkuntime().equals(other.getMtOkuntime()))
            && (this.getMtTime() == null ? other.getMtTime() == null : this.getMtTime().equals(other.getMtTime()))
            && (this.getJobDescription() == null ? other.getJobDescription() == null : this.getJobDescription().equals(other.getJobDescription()))
            && (this.getMtEquipmentId() == null ? other.getMtEquipmentId() == null : this.getMtEquipmentId().equals(other.getMtEquipmentId()))
            && (this.getMtAcceptperson() == null ? other.getMtAcceptperson() == null : this.getMtAcceptperson().equals(other.getMtAcceptperson()))
            && (this.getMtAccepttime() == null ? other.getMtAccepttime() == null : this.getMtAccepttime().equals(other.getMtAccepttime()))
            && (this.getNotes() == null ? other.getNotes() == null : this.getNotes().equals(other.getNotes()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getInsertPerson() == null ? other.getInsertPerson() == null : this.getInsertPerson().equals(other.getInsertPerson()))
            && (this.getInsertTime() == null ? other.getInsertTime() == null : this.getInsertTime().equals(other.getInsertTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMtId() == null) ? 0 : getMtId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getMtMpId() == null) ? 0 : getMtMpId().hashCode());
        result = prime * result + ((getMtOkontime() == null) ? 0 : getMtOkontime().hashCode());
        result = prime * result + ((getMtOkuntime() == null) ? 0 : getMtOkuntime().hashCode());
        result = prime * result + ((getMtTime() == null) ? 0 : getMtTime().hashCode());
        result = prime * result + ((getJobDescription() == null) ? 0 : getJobDescription().hashCode());
        result = prime * result + ((getMtEquipmentId() == null) ? 0 : getMtEquipmentId().hashCode());
        result = prime * result + ((getMtAcceptperson() == null) ? 0 : getMtAcceptperson().hashCode());
        result = prime * result + ((getMtAccepttime() == null) ? 0 : getMtAccepttime().hashCode());
        result = prime * result + ((getNotes() == null) ? 0 : getNotes().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getInsertPerson() == null) ? 0 : getInsertPerson().hashCode());
        result = prime * result + ((getInsertTime() == null) ? 0 : getInsertTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", mtId=").append(mtId);
        sb.append(", code=").append(code);
        sb.append(", mtMpId=").append(mtMpId);
        sb.append(", mtOkontime=").append(mtOkontime);
        sb.append(", mtOkuntime=").append(mtOkuntime);
        sb.append(", mtTime=").append(mtTime);
        sb.append(", jobDescription=").append(jobDescription);
        sb.append(", mtEquipmentId=").append(mtEquipmentId);
        sb.append(", mtAcceptperson=").append(mtAcceptperson);
        sb.append(", mtAccepttime=").append(mtAccepttime);
        sb.append(", notes=").append(notes);
        sb.append(", state=").append(state);
        sb.append(", insertPerson=").append(insertPerson);
        sb.append(", insertTime=").append(insertTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}